package com.shawn.spring.boot.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shawn.spring.boot.mybatisplus.entity.User;
import com.shawn.spring.boot.mybatisplus.mapper.UserMapper;
import com.shawn.spring.boot.mybatisplus.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * 系统用户 服务实现类
 *
 * @author shawn
 * @since 2020-08-30
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

  @Override
  public int saveReturnKey(User user) {
    return getBaseMapper().insertReturnKey(user);
  }

  @Override
  public Page<User> selectByPage(Page<User> page) {
    getBaseMapper().selectPage(page, null);
    return page;
  }
}
